// require('#/alert/messager')

$('#fm_edit_password').bootstrapValidator({
    feedbackIcons: {
        valid: 'glyphicon glyphicon-ok',
        invalid: 'glyphicon glyphicon-remove',
        validating: 'glyphicon glyphicon-refresh'
    },
    fields: {
        txtOldPass: {
            validators: {
                notEmpty: {
                    message: '此项必填'
                }
            }
        },
        txtNewPass: {
            validators: {
                notEmpty: {
                    message: '此项必填'
                }
            }
        },
        txtRePass: {
            validators: {
                notEmpty: {
                    message: '此项必填'
                },
                callback: {
                    message: '两次密码不一致',
                    callback: function (value, validator) {
                        var new_pass = $('#txtNewPass').val();
                        return value == new_pass;
                    }
                }
            }
        }
    }
}).on('success.form.bv', function (e) {
    e.preventDefault();
    
    // $.messager.alert('验证成功！', 'error');
});